﻿<Window x:Class="WpfUserManager.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="365" Width="525" Loaded="Window_Loaded">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        
        <ListBox Grid.Column="0" Name="lbPersons" SelectionChanged="lbPersons_SelectionChanged"/>

        <Grid Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Label Grid.Column="0" Grid.Row="0" Content="Id" HorizontalAlignment="Right"/>
            <Label Grid.Column="0" Grid.Row="1" Content="First Name" HorizontalAlignment="Right"/>
            <Label Grid.Column="0" Grid.Row="2" Content="Last Name" HorizontalAlignment="Right"/>
            <Label Grid.Column="0" Grid.Row="3" Content="Birth Date" HorizontalAlignment="Right"/>

            <TextBlock Grid.Column="1" Grid.Row="0" Margin="2" Name="txtId"/>
            <TextBox Grid.Column="1" Grid.Row="1" Margin="2" Name="txtFirstName"/>
            <TextBox Grid.Column="1" Grid.Row="2" Margin="2" Name="txtLastName"/>
            <DatePicker Grid.Column="1" Grid.Row="3" Margin="2" Name="calendarBirthDate" 
                        FirstDayOfWeek="Monday" 
                        SelectedDateFormat="Long"/>

            <StackPanel Grid.Column="1" Grid.Row="4" Margin="0">
                <Button Content="Add" Name="btnAdd" Margin="2" Padding="3" Click="btnAdd_Click"/>
                <Button Content="Update" Name="btnUpdate" Margin="2" Padding="3" Click="btnUpdate_Click"/>
                <Button Content="Remove" Name="btnRemove" Margin="2" Padding="3" Click="btnRemove_Click"/>
            </StackPanel>

        </Grid>
    </Grid>
</Window>
